<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>桉树IBC用户中心</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <script language="JavaScript" src="../js/jquery.js"></script>
    <script src="../js/cloud.js" type="text/javascript"></script>

    <script language="javascript">
        $(function(){
            $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
            $(window).resize(function(){
                $('.loginbox').css({'position':'absolute','left':($(window).width()-692)/2});
            });
        });

        function login(){
            //使用app的登录流程,保存为member
            var username = $(".loginuser").val();
            var password = $(".loginpwd").val();
            var parameter = {mobile:username,password:password};
            try{
            	 $.ajax({
         	        url: '/euc/_user/login',
         	        data:parameter,
         	        dataType: 'JSON',
         	        async: false,
         	        contentType:'application/x-www-form-urlencoded',
         	        type: 'POST',
         	        success: function(data, textStatus, response) {
         	        	if(data.status==0){
             		        localStorage.setItem('memberToken',data.data.token);
             		        localStorage.setItem('memberDeptId',data.data.member.deptId);
             		        localStorage.setItem('memberCompanyName',data.data.member.companyName);
             		        localStorage.setItem('memberAdmin',data.data.member.isAdmin);
             		        localStorage.setItem('memberSpaceId',data.data.member.spaceId);
             		        localStorage.setItem('memberId',data.data.member.id);
             		        localStorage.setItem('memberName',data.data.member.name);
             		        window.location.href="/euc/center/member/page";
             		        window.parent.location.href ="/euc/center/member/page";
             		    //    window.open('/euc/center/member/page');opener=null;top.close();
         	        	}else{
         	        		alert(data.message);
         	        	}

         	        },
         	        error: function () {
         	            alert("error");
         	        }
                });

            }
            catch(e){
                alert(e.message);
            }
        }


    </script>

</head>

<body style="background-color:#1c77ac; background-image:url(../images/light.png); background-repeat:no-repeat; background-position:center top; overflow:hidden;">



<div id="mainBody">
    <div id="cloud1" class="cloud"></div>
    <div id="cloud2" class="cloud"></div>
</div>


<div class="logintop">
    <!--   <span>欢迎登录</span>
      <ul>
      <li><a href="#">回首页</a></li>
      <li><a href="#">帮助</a></li>
      <li><a href="#">关于</a></li>
      </ul>     -->
</div>

<div class="loginbody">

    <span class="systemlog  o"></span>

    <div class="loginbox">

        <ul>
            <li><input name="" type="text" class="loginuser" onclick="JavaScript:this.value=''"/></li>
            <li><input name="" type="password" class="loginpwd" onclick="JavaScript:this.value=''"/></li>
            <li><input name="" type="button" class="loginbtn" value="登录"  onclick="login()"  />
                <label><input name="" type="checkbox" value="" checked="checked" />记住密码</label>
            </li>
        </ul>


    </div>

</div>



<div class="loginbm">版权所有 </div>

<div class="tip">
    <div class="tiptop"><span>提示信息</span><a></a></div>
    <div class="tipinfo">
        <span><img src="../images/ticon.png" /></span>
        <div class="tipright">
            <p>是否确认对信息的修改 ？</p>
            <cite>如果是请点击确定按钮 ，否则请点取消。</cite>
        </div>
    </div>
    <div class="tipbtn">
        <input name="" type="button"  class="sure" value="确定" />&nbsp;
    </div>
</div>
</body>
</html>
